﻿using System;
using System.Collections.Generic;
using System.Text;
using ConfigServices;
using Microsoft.Extensions.DependencyInjection;

namespace Microsoft.Extensions.DependencyInjection
{
  public static class ConfigServiceExtension
  {
    public static void AddIniFileConfigService(this IServiceCollection service,string filePath)
    {
      service.AddScoped(typeof(IConfigService), a => new IniFileConfigService { FilePath =  filePath});
    }
    public static void AddEnvConfigService(this IServiceCollection services)
    {
      services.AddScoped<IConfigService, EnvVarConfigService>();
    }
  }
}
